Methods and systems for efficient image cropping and analysis

ABSTRACT

A system and method for cropping a license plate image to facilitate license plate recognition by obtaining an image that includes the license plate image, dividing the image into multiple sub-blocks, computing an activity measure for each sub-block; determining an activity threshold, determining that a sub-block is an active sub-block by comparing the activity measure for the sub-block with the activity threshold, generating a second image of the license plate information, where the second image includes the active sub-block, and obtaining the license plate information based on the second image.

TECHNICAL FIELD

The present disclosure relates generally to methods, systems, andcomputer-readable media for cropping images for license platerecognition.

BACKGROUND

Automated license plate recognition (hereinafter, “ALPR”) generallyrefers to an automated process for applying optical characterrecognition (hereinafter, “OCR”) techniques to images captured bytraffic cameras to recognize vehicle license plate information.

ALPR technology is useful for law enforcement and other purposes,allowing for mass surveillance of vehicle traffic for a variety purposesat very low personnel costs. ALPR technology can be utilizedconcurrently with a variety of law enforcement procedures, such astechniques for determining vehicle speed, monitoring traffic signals,electronic toll collection, and individual vehicle surveillance.

ALPR methods can involve three steps. The first step can be determiningthe location of the license plate in the image (hereinafter, “platelocalization”). The second step can be separating the individualcharacters on the license plate from the remainder of the image(hereinafter, “character segmentation”). The third step can be applyingOCR techniques to the segmented characters.

The challenge for character segmentation is to provide a robust, highlyaccurate solution that is also computationally efficient. Accordingly,to minimize computational load and reduce extraneous noises present incaptured images, it is common to identify a tight bounding box sub-image(hereinafter, “tight bounding box” or “TBB”) that surrounds the licenseplate characters prior to character segmentation.

However, extracting a tight bounding box sub-image can be a challengingtask due to variations in image quality, noise, tilt of captured licenseplate images, etc.

Accordingly, APLR technology may be improved by techniques forefficiently identifying and/or extracting a tight bounding box thatsurrounds license plate characters in a captured image.

SUMMARY

The present disclosure relates generally to methods, systems, andcomputer readable media for providing these and other improvements toAPLR technology.

Implementations of the present teachings relate to methods for obtaininglicense plate information from an image. In some embodiments, acomputing device can obtain an image that includes a license plateimage, divide the image into multiple sub-blocks, compute a spatialactivity measure for each sub-block; determine an activity threshold,determine that a sub-block is an active sub-block by comparing thespatial activity measure for the sub-block with the activity threshold,generate a second image of the license plate, where the second imageincludes the active sub-block, and obtain the license plate informationbased on the second image.

In certain implementations, the image that is obtained can generated bythe computing device by vertically cropping a previous image to removeparts of the image above and below the license plate and/or removingtilt of the license plate within the image.

In some embodiments, the computing device can perform a frequencyanalysis on each sub-block, where the spatial activity measure for eachsub-block is based on the frequency analysis of that sub-block.

In further embodiments, the computing device can generate an activityprofile for the image based on the spatial activity measure for eachsub-block, where the activity threshold is based on the activityprofile.

In other embodiments, the computing device can determine that a secondsub-block is an inactive sub-block by comparing the spatial activitymeasure for the second sub-block with the activity threshold, where thesecond image includes the active sub-block but does not include theinactive sub-block. Alternatively or additionally, the computing devicecan determine that a third sub-block is an inactive sub-block bydetermining that the third sub-block is between an inactive sub-blockand an edge of the image.

In still further embodiments, the computing device can determine that asecond sub-block is a second active sub-block by determining that thesecond sub-block is between the active sub-block and a third activesub-block in the image.

In other embodiments, the computing device can determining a third imageof the license plate that includes only active sub-blocks, determinethat the third image is overcropped with respect to the license plateinformation by comparing a ratio of the third image with an expectedlicense plate ratio. Based on such a determination, the computing devicecan generate the second image, where the second image includes one ormore inactive sub-blocks in addition to the active sub-block.

In further embodiments, the computing device can compute the spatialactivity measure using the formula:

$a_{ij} = {\sum\limits_{k \cdot {l{({{k + l} > 0})}}}{C_{kl}}^{2}}$where C_(kl) represents resultant coefficients of a two-dimensionaldiscrete cosine transform performed on a sub-block B_(ij), and a_(ij)represents the spatial activity measure for the sub-block B_(ij).

Implementations of the present teachings relate to computer systems forobtaining license plate information from an image. In embodiments, thesystems include one or more memory devices storing instructions, and oneor more processors coupled to the one or more memory devices. The one ormore processors are configured to execute the instructions to performmethods and operations. The methods and operations include obtaining animage that includes a license plate image, dividing the image intomultiple sub-blocks, computing a spatial activity measure for eachsub-block; determining an activity threshold, determining that asub-block is an active sub-block by comparing the spatial activitymeasure for the sub-block with the activity threshold, generating asecond image of the license plate, where the second image includes theactive sub-block, and obtaining the license plate information based onthe second image.

Implementations of the present teachings also relate to computerreadable storage media storing instructions. The instructions cause oneor more processors to perform methods and operations for obtaininglicense plate information from an image. The methods and operationsinclude obtaining an image that includes a license plate image, dividingthe image into multiple sub-blocks, computing a spatial activity measurefor each sub-block; determining an activity threshold, determining thata sub-block is an active sub-block by comparing the spatial activitymeasure for the sub-block with the activity threshold, generating asecond image of the license plate, where the second image includes theactive sub-block, and obtaining the license plate information based onthe second image.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of this specification, illustrate various embodiments of thepresent disclosure and together, with the description, serve to explainthe principles of the present disclosure. In the drawings:

FIG. 1 is a flow diagram illustrating an exemplary method of performinglicense plate recognition, consistent with certain disclosedembodiments;

FIG. 2 is a flow diagram illustrating an exemplary method of performinghorizontal cropping as part of extracting a tight bounding box forlicense plate recognition, consistent with certain disclosedembodiments;

FIG. 3 is a diagram illustrating an exemplary sequence of images thatrepresent a process of performing horizontal cropping as part ofextracting a tight bounding box for license plate recognition,consistent with certain disclosed embodiments;

FIG. 4 is a diagram illustrating an exemplary sequence of images thatrepresent a process of performing horizontal cropping as part ofextracting a tight bounding box for license plate recognition,consistent with certain disclosed embodiments;

FIG. 5 is a diagram illustrating an exemplary sequence of images thatrepresent a process of performing horizontal cropping as part ofextracting a tight bounding box for license plate recognition,consistent with certain disclosed embodiments; and

FIG. 6 is a diagram illustrating an exemplary hardware system forcropping images for license plate recognition, consistent with certaindisclosed embodiments.

DETAILED DESCRIPTION

The following detailed description refers to the accompanying drawings.Wherever possible, the same reference numbers are used in the drawingsand the following description refers to the same or similar parts. Whileseveral exemplary embodiments and features of the present disclosure aredescribed herein, modifications, adaptations, and other implementationsare possible, without departing from the spirit and scope of the presentdisclosure. Accordingly, the following detailed description does notlimit the present disclosure. Instead, the proper scope of thedisclosure is defined by the appended claims.

FIG. 1 is a flow diagram illustrating an exemplary method of performinglicense plate recognition, consistent with certain disclosedembodiments. The process can begin in 100 when a computing devicereceives an image that includes a depiction of a license plate of avehicle. For example, the computing device can receive the image from atraffic camera. As used herein, an image may refer to a single image,multiple images, or a video captured by a camera. The image canadditionally include part of the vehicle and/or background scenery andobjects. In some embodiments, the computing device can directly beconnected to and/or integrated with the traffic camera, while, infurther embodiments, the computing device can be remote to the trafficcamera, and receive the images, directly or indirectly, via a networkconnection.

In 110, the computing device can perform license plate localization todetermine the license plate location within the image using variousmethods known in the art, including, but not limited to, edge detection,image-based classification, and binarization. In some embodiments, thecomputing device can calculate and store the license plate location inassociation with the image or as metadata included with the image. Thelicense plate location can be stored as, for example, pixel locations ofthe edges of the license plate. Hereinafter, reference will be made toan image, which can include either a cropped and/or an uncropped form ofthe image.

In 120, the computing device can identify and extract a tight boundingbox surrounding the license plate characters. In some embodiments,extracting a tight bounding box can include tilt removal 120A, verticalcropping 120B, and horizontal cropping 120C.

In embodiments, tilt removal 120A can be used to adjust perspectives oflicense plate data. For example, in many implementations, trafficcameras may capture images of license plates at various differentangles. The various tilts in the license plate data caused by capturingthe license plates at various different angles can create challengeswith processing the license plate data. Accordingly, tilt removal 120Acan be used to standardize the perspective of the license plates,facilitating ALPR processing. Tilt removal 120A can be performed usingvarious methods known in the art.

In embodiments, vertical cropping 120B can be used to adjust the imagevertically to remove image data below and above the license platelocation. For example, the computing device can detect a license platetop edge and/or the top of license plate text and crop out all imagedata that is above that point. Similarly, the computing device candetect a license plate bottom edge and/or the bottom of license platetext and crop out all image data that is below that point. Accordingly,only a horizontal strip of the image that includes the license plate mayremain.

In embodiments, horizontal cropping 120C can be used to adjust theremaining horizontal strip to remove image data to the left and to theright of the license plate location. Horizontal cropping 120C may beperformed using a frequency based method, such as the method describedbelow in reference to FIG. 2. The image remaining after cropping can bethe extracted tight bounding box.

In 130, the computing device can segment the characters on the licenseplate in the extracted tight bounding box. In some embodiments, thecomputing device can analyze the extracted tight bounding box andseparate the extracted tight bounding box into smaller segmentscontaining individual characters using methods and systems known in theart.

In 140, the computing device can perform known methods of characterrecognition, such as OCR, on the segmented characters.

In 150, the computing device can identify the state by, for example,recognizing the license plate design based on a template, recognizingthe format of the character sequence (e.g. three letters then fournumbers, where the first letter is an “A”) based on statistics generatedfrom prior training data, and/or recognizing a state logo within thelicense plate.

While the steps depicted in FIG. 1 have been described as performed in aparticular order, the order described is merely exemplary, and variousdifferent sequences of steps can be performed, consistent with certaindisclosed embodiments. Further, the steps described are not intended tobe exhaustive or absolute, and various steps can be inserted or removed.

FIG. 2 is a flow diagram illustrating an exemplary method of performinghorizontal cropping as part of extracting a tight bounding box forlicense plate recognition, consistent with certain disclosedembodiments. For example, a computing device can perform the processdepicted in FIG. 2 as part of the horizontal cropping 120C of thelicense plate recognition process depicted in FIG. 1.

The process can begin in 200 when a computing device receives, forexample, a tilt removed and vertically cropped image (hereinafter, “TRVCimage”). For example, the computing device can receive the result oftilt removal 120A and vertical cropping 120B from the license platerecognition process depicted in FIG. 1. In other embodiments, thedescribed process can begin when an unaltered image from a trafficcamera, a tilt removed image, a vertically cropped image, or anotherwise altered image is received.

In 210, the computing device can divide the received image intosub-blocks. For example, the computing device can divide the receivedimage into N×N sub-blocks, where N is the height of the TRVC image. Inother embodiments, the received image can be divided into sub-blocksthat are not based on the height of the received image and/or sub-blocksof varying size and divided based on various algorithms.

In 220, the computing device can process each sub-block by, for example,performing a frequency analysis on each sub-block. In embodiments, thecomputing device can perform a two-dimensional discrete cosine transform(hereinafter, “DCT”) within each sub-block, which results incoefficients for each block. The coefficients C_(kl) resulting from atwo dimensional type-II DCT applied to an image I can be given by thefollowing formula:

$C_{kl} = {{\alpha(k)}{\alpha(l)}{\sum\limits_{k = 0}^{N - 1}{\sum\limits_{l = 0}^{N - 1}{I_{ij}{\cos\left\lbrack \frac{\left( {{2i} + 1} \right)k\;\pi}{2N} \right\rbrack}{\cos\left\lbrack \frac{\left( {{2j} + 1} \right)l\;\pi}{2N} \right\rbrack}}}}}$

In the above equation, I_(ij) can represent the image pixel intensityvalue at coordinates (i, j) and the values of α(k) and α(l) can becomputed according to the following formula:

${\alpha(x)} = \left\{ \begin{matrix}{{\sqrt{\frac{1}{N}}\mspace{14mu}{for}\mspace{14mu} x} = 0} \\{\sqrt{\frac{2}{N}}\mspace{14mu}{otherwise}}\end{matrix} \right.$

In other embodiments, DCT variants, such as type-I DCT, type-III DCT,and modified DCT can be utilized. In further embodiments, differentfrequency analysis processes and/or functions can be utilized, such as,for example, sine functions.

In 230, the computing device can compute a spatial activity measure foreach sub-block. In embodiments, the computing device can use the resultsof a frequency analysis of a sub-block (220) to compute the spatialactivity measure of the sub-block. For example, the computing device cancompute spatial activity measure of a sub-block using the formula:

$a_{ij} = {\sum\limits_{k \cdot {l{({{k + l} > 0})}}}{C_{kl}}^{2}}$

In the above equation, C_(kl) can represent the resultant coefficientsof a two-dimensional DCT performed on a sub-block B_(ij), and a_(ij) canrepresent the spatial activity measure for the sub-block B_(ij).

In 240, the computing device can generate an activity profile for theimage. For example, the computing device can average spatial activitymeasures of the sub-blocks generated in 230 to generate aone-dimensional activity profile p_(j) where j is the sub-block index.

In 250, the computing device can determine an activity threshold. Inembodiments, the activity threshold can be determined using theone-dimensional activity profile p_(j). For example, the activitythreshold can selected to be a fixed fraction (e.g. 0.1) between thelowest and highest p_(j) over the entire image.

In 260, the computing device can determine which sub-blocks have aspatial activity measure that is greater than the activity thresholddetermined in 250 (hereinafter, “active sub-block”). In embodiments, thesub-blocks with a spatial activity measure greater than the activitythreshold can be stored separately and/or returned to a requester. Inother embodiments, an index array can be associated with the sub-blocks,with each element of the index array associated with a differentsub-block. Accordingly, each element of the index array can be set basedon whether the associated sub-block has a spatial activity measuregreater than the activity threshold. For example, a value of 1 can beset for each element associated with a sub-block that has a spatialactivity measure greater than or equal to the activity threshold, and avalue of 0 can set for each element associated with a sub-block that hasa spatial activity measure less than the activity threshold hold(hereinafter, “inactive sub-block”). Additional data structures and/orelement values or variables can be used to record which sub-blocks havea spatial activity measure greater than and/or equal to an activitythreshold, consistent with disclosed embodiments.

In 270, the computing device can evaluate one or more sub-blocks thathave less than a threshold amount of activity (determined in 260) todetermine if the sub-block is near the edge of the image. For example,the computing device can determine that a sub-block is near the edge ofthe image by determining that the sub-block is adjacent to a sub-blockthat is on the edge of the image. In some embodiments, the computingdevice may only determine that a sub-bock is near an edge if thesub-block is adjacent to a sub-block that is smaller than the evaluatedsub-block, if there is not a sub-block between the evaluated sub-blockand the edge of the image, and/or if the sub-block adjacent to theevaluated sub-block is smaller than an N×N sub-block.

If the evaluated sub-block in 270 is near the edge of the image, thecomputing device can, in 270A, stretch the inactive area of the imagefrom the sub-block to the extremum at the edge of the image.Accordingly, a sub-block between the evaluated sub-block or theundivided area between the edge of the image and the evaluated sub-blockcan be determined to have less than a threshold amount of activitywithout having to evaluate the area and/or sub-block. If the evaluatedsub-block is not near the edge of the image, the computing device canevaluate another inactive sub-block in 270 or proceed to 280.

In 280, the computing device can evaluate one or more sub-blocks thathave less than a threshold amount of activity (determined in 260) todetermine if the inactive sub-block is between active sub-blocks. Forexample, the computing device can determine that an inactive sub-blockis between active sub-blocks by determining that the inactive sub-blockis between a first active sub-block on one side and a second activesub-block on the other side. In some embodiments, the computing devicemay only determine that a sub-block is between active sub-blocks if theinactive sub-block is adjacent to a first active sub-block on one sideand adjacent to a second active sub-block on the other side, while, infurther embodiments, the computing device may not requires the activesub-blocks to be adjacent for such a determination to be made.

If the inactive sub-block in 280 is between active sub-blocks, thecomputing device can, in 280A, mark the sub-block as active, regardlessof the spatial activity measure of the sub-block. Accordingly, if alicense plate includes a state logo in the middle of the plate and thesub-block surrounding the state logo is determined to be an inactivesub-block, the sub-block can be re-marked as active based on thesub-block position between two active sub-blocks that include licenseplate text.

In other embodiments, the computing device can lower the threshold levelfor evaluating whether the sub-block is inactive or active. For example,if a sub-block had less than the threshold level of activity in 260, butwas near the threshold level, the sub-block may be re-marked as activeif between two active sub-blocks. However, as an additional example, ifthe sub-block has a very low level of activity in 260, the sub-block maynot be re-marked despite being between two active blocks. If theevaluated sub-block is not between active sub-blocks, the computingdevice can evaluate another inactive sub-blocks in 280 or proceed tostore the resulting active sub-blocks.

The resulting active sub-blocks can be stored as a horizontally croppedversion of the license plate image. In some embodiments, in 290, thecomputing device can evaluate the horizontally cropped version of thelicense plate image to ensure that the license plate has not beenovercropped. For example, the computing device can compare the aspectratio of the horizontally cropped version of the license plate to anexpected license plate aspect ratio or a range of ratios. If the aspectratios do not match, are off by an amount greater than a set threshold,and/or the aspect ratio of the horizontally cropped version of thelicense plate does not fall within the range of ratios, the computingdevice can determine that overcropping has occurred and return the TRVCimage, or, in some embodiments, the computing device can add inactivesub-blocks to the horizontally cropped version of the license plateimage. If the aspect ratios match, or are off by an amount less than (orequal) to a set threshold, the computing device can return only thehorizontally cropped version of the license plate image. In furtherembodiments, the computing device can additional evaluate thehorizontally cropped version of the license plate image to ensure thatthe license plate has not been undercropped.

Using the returned license plate image, the computing device can proceedwith additional ALPR steps, as, for example, described above inreference to FIG. 1.

While the steps depicted in FIG. 2 have been described as performed in aparticular order, the order described is merely exemplary, and variousdifferent sequences of steps can be performed, consistent with certaindisclosed embodiments. Further, the steps described are not intended tobe exhaustive or absolute, and various steps can be inserted or removed.

FIG. 3 is a diagram illustrating an exemplary sequence of images thatrepresent a process of performing horizontal cropping as part ofextracting a tight bounding box for license plate recognition,consistent with certain disclosed embodiments. FIG. 3 is intended merelyfor the purpose of illustration and is not intended to be limiting.

As depicted in FIG. 3, image 300 represents a TRVC image that can beproduced as part of a process of extracting a tight bounding box inALPR. For example, image 300 can represent an image of a license platethat has been localized, had the tilt removed, and has been verticallycropped (e.g. the TRVC image received in 200 of FIG. 2).

As further depicted in FIG. 3, a computing device can divide the TRVCimage into sub-blocks 311, 312, 313, 314, 315, 316, and 317. Forexample, the sub-blocks (with the exception of sub-block 317) can beN×N, where N is the height of the TRVC image. In some embodiments,sub-block 317 may not be identified as a sub-block or can be identifiedas a partial sub-block.

The computing device can then perform a frequency analysis on eachsub-block, compute a spatial activity measure for each sub-block, andgenerate an activity profile for the TRVC image (e.g. 220-240 of FIG.2). The computing device can determine an activity threshold using theactivity profile and then return sub-blocks with a threshold level ofactivity (e.g. 250-260 of FIG. 2).

As depicted in FIG. 3, sub-blocks 311, 316, and 317 may have little tono measured spatial activity. Accordingly, the spatial activity measureof sub-blocks 311, 316, and 317 may be less than an activity threshold.Therefore the computing device may only return sub-blocks 312, 313, 314,and 315, resulting in horizontally cropped image 320.

In some embodiments, the spatial activity of sub-block 317 may not bemeasured due to its position between inactive sub-block 316 and the edgeof the image, due to its status as a partial sub-block, and/or due tonot being identified as a sub-block. In such embodiments, sub-block 317may be automatically marked as inactive if the inactive area of the TRVCimage (e.g. sub-block 316) is stretch to the extremum at the edge of theimage (e.g. 270A in FIG. 2).

FIG. 4 is a diagram illustrating an exemplary sequence of images thatrepresent a process of performing horizontal cropping as part ofextracting a tight bounding box in ALPR, consistent with certaindisclosed embodiments. FIG. 4 is intended merely for the purpose ofillustration and is not intended to be limiting.

As depicted in FIG. 4, image 400 represents a TRVC image that can beproduced as part of a process of extracting a tight bounding box inALPR. For example, image 400 can represent an image of a license platethat has been localized, had the tilt removed, and has been verticallycropped (e.g. the TRVC image received in 200 of FIG. 2).

As further depicted in FIG. 4, a computing device can divide the TRVCimage into sub-blocks 411, 412, 413, 414, 415, 416, and 417. Forexample, the sub-blocks (with the exception of sub-block 417) can beN×N, where N is the height of the TRVC image.

The computing device can then perform a frequency analysis on eachsub-block, compute a spatial activity measure for each sub-block, andgenerate an activity profile for the TRVC image (e.g. 220-240 of FIG.2). The computing device can determine an activity threshold using theactivity profile and then return sub-blocks with a threshold level ofactivity (e.g. 250-260 of FIG. 2).

As depicted in FIG. 4, sub-blocks 411, 414, and 417 may have little tono measured spatial activity. Accordingly, the spatial activity measureof sub-blocks 411, 414, and 417 may be less than an activity threshold.Therefore, sub-blocks 412, 413, 415, and 416 can be marked as activesub-blocks and sub-blocks 411, 414, and 417 can be marked as inactivesub-blocks

In some embodiments, the computing device can evaluate sub-block 414 anddetermine that inactive sub-block 414 is between active sub-block 413and active sub-block 415. Accordingly, the computing device can changesub-block 414 from inactive to active (e.g. 280A in FIG. 2).

Therefore the computing device may only return sub-blocks 412, 413, 414,415, and 416, resulting in horizontally cropped image 420.

FIG. 5 is a diagram illustrating an exemplary sequence of images thatrepresent a process of performing horizontal cropping as part ofextracting a tight bounding box in ALPR, consistent with certaindisclosed embodiments. FIG. 5 is intended merely for the purpose ofillustration and is not intended to be limiting.

As depicted in FIG. 5, image 500 represents a TRVC image that can beproduced as part of a process of extracting a tight bounding box inALPR. For example, image 500 can represent an image of a license platethat has been localized, had the tilt removed, and has been verticallycropped (e.g. the TRVC image received in 200 of FIG. 2).

As further depicted in FIG. 5, a computing device can divide the TRVCimage into sub-blocks 510A, 510B, 510C, 510D, 510E, 510F, 510G, 510H,5101, 510J, 510K, and 510L. For example, the sub-blocks (with theexception of sub-block 510L) can be N×N, where N is the height of theTRVC image.

The computing device can then perform a frequency analysis on eachsub-block, compute a spatial activity measure for each sub-block, andgenerate an activity profile for the TRVC image (e.g. 220-240 of FIG.2). The computing device can determine an activity threshold using theactivity profile and then return sub-blocks with a threshold level ofactivity (e.g. 250-260 of FIG. 2).

As depicted in FIG. 5, sub-blocks 510A, 510B, 510C, 510J, 510K, and 510Lmay have little to no measured spatial activity. Accordingly, thespatial activity measure of sub-blocks 510A, 510B, 510C, 510J, 510K, and510L may be less than an activity threshold. Additionally, for thepurposes of this example, sub-block 5101 may also be determined to havea spatial activity measure less than the activity threshold. Therefore,sub-blocks 510D, 510E, 510F, 510G, and 510H can be marked as activesub-blocks and sub-blocks 510A, 510B, 510C, 5101, 510J, 510K, and 510Lcan be marked as inactive sub-blocks

Therefore, the inactive sub-blocks can be removed, resulting inhorizontally cropped image 520.

The computing device can evaluate the horizontally cropped image toensure that the license plate has not been overcropped. The computingdevice can compare the aspect ratio of the horizontally cropped image toan expected license plate aspect ratio or a range of ratios. Forexample, an expected license plate aspect ratio can be 0.2 for aparticular jurisdiction and/or a range of expected license plate aspectratios can be between 0.195 and 0.205. Accordingly, the computing devicecan evaluate the aspect ratio of image 520 and determine that the aspectratio is larger than 0.2 (and/or 0.205). Therefore, the computing devicecan determine that overcropping has likely occurred and return image 530instead of horizontally cropped image 520, which is the same image asTRVC image 500.

FIG. 6 is a diagram illustrating an exemplary hardware system forcropping images for license plate recognition, consistent with certaindisclosed embodiments. Computing device 600 may represent any type ofone or more computing devices.

Computing device 600 may include, for example, one or moremicroprocessors 610 of varying core configurations and clockfrequencies; one or more memory devices or computer-readable media 620of varying physical dimensions and storage capacities, such as flashdrives, hard drives, random access memory, etc., for storing data, suchas images, files, and program instructions for execution by one or moremicroprocessors 610; etc. One or more microprocessors 610, and one ormore memory devices or computer-readable media 620 may be part of asingle device as disclosed in FIG. 6 or may be contained within multipledevices. Those skilled in the art will appreciate that theabove-described componentry is exemplary only, as computing device 600may comprise any type of hardware componentry, including any necessaryaccompanying firmware or software, for performing the disclosedembodiments. Further, computing device 600 can include, for example,video camera interface 640 for communication with one or more videocameras. For example, computing device can receive images from a trafficcamera via video camera interface 640. Additionally or alternatively,computing device 600 can include, for example, network interface 630 forcommunicating with one or more additional computing devices. Forexample, computing device can, via network interface 630, receive imagesthat include depictions of licenses plates from the one or moreadditional computing devices, receive TRVC images from the one or morecomputing devices, transmit license plate information to the one or morecomputing devices, transmit horizontally cropped images to the one ormore computing devices, etc.

While the teachings has been described with reference to the exemplaryembodiments thereof, those skilled in the art will be able to makevarious modifications to the described embodiments without departingfrom the true spirit and scope. The terms and descriptions used hereinare set forth by way of illustration only and are not meant aslimitations. In particular, although the method has been described byexamples, the steps of the method may be performed in a different orderthan illustrated or simultaneously. Furthermore, to the extent that theterms “including”, “includes”, “having”, “has”, “with”, or variantsthereof are used in either the detailed description and the claims, suchterms are intended to be inclusive in a manner similar to the term“comprising.” As used herein, the term “one or more of” with respect toa listing of items such as, for example, A and B, means A alone, Balone, or A and B. Those skilled in the art will recognize that theseand other variations are possible within the spirit and scope as definedin the following claims and their equivalents.

What is claimed is:
 1. A method comprising: obtaining an imagecomprising license plate information; dividing the image into aplurality of sub-blocks; computing a spatial activity measure for eachsub-block of the plurality of sub-blocks, wherein the spatial activitymeasure includes a two-dimensional discrete cosine transform (DCT);generating a one-dimensional activity profile for the image based on thespatial activity measure for each sub-block; determining an activitythreshold based on a predetermined percentage; determining that asub-block of the plurality of sub-blocks is an active sub-block bycomparing the spatial activity measure for the sub-block with theactivity threshold; generating, using one or more processors, a secondimage of the license plate information, wherein the second imagecomprises the active sub-block; and obtaining the license plateinformation based on the second image.
 2. The method of claim 1,wherein, prior to obtaining the image, the image is generated byvertically cropping a third image comprising the license plateinformation.
 3. The method of claim 1, wherein, prior to obtaining theimage, the image is generated by removing tilt from a third imagecomprising the license plate information.
 4. The method of claim 1,further comprising performing a frequency analysis on each sub-block ofthe plurality of sub-blocks, wherein the spatial activity measure foreach sub-block is based on the frequency analysis of that sub-block. 5.The method of claim 1, further comprising determining that a secondsub-block of the plurality of sub-blocks is inactive, wherein: thespatial activity measure of the second sub-block is less than theactivity threshold; and the second sub-block is determined to beinactive based on the second sub-block being between the activesub-block and a third active sub-block in the image.
 6. The method ofclaim 1, further comprising determining that a second sub-block of theplurality of sub-blocks is an inactive sub-block by comparing thespatial activity measure for the second sub-block with the activitythreshold, wherein the second image does not comprise the inactivesub-block.
 7. The method of claim 6, further comprising determining thata third sub-block of the plurality of sub-blocks is an inactivesub-block by determining that the third sub-block is between theinactive sub-block and an edge of the image.
 8. The method of claim 1,further comprising determining that a second sub-block of the pluralityof sub-blocks is active, wherein: the spatial activity measure of thesecond sub-block is less than the activity threshold; and the secondsub-block is determined to be active based on the second sub-block beingbetween the active sub-block and a third active sub-block in the image.9. The method of claim 1, further comprising: determining a third imageof the license plate comprising only active sub-blocks; determining thatthe third image is overcropped with respect the license plateinformation based on comparing a ratio of the third image with anexpected license plate ratio; and wherein, the second image additionallycomprises one or more inactive sub-blocks.
 10. The method of claim 1,wherein the spatial activity measure is computed using the formula:$a_{ij} = {\sum\limits_{k \cdot {l{({{k + l} > 0})}}}{C_{kl}}^{2}}$wherein C_(kl) represents resultant coefficients of a two-dimensionalDCT performed on a sub-block B_(ij), and a_(ij) represents the spatialactivity measure for the sub-block B_(ij).
 11. A system comprising: aprocessing system comprising one or more processors; and a memory systemcomprising one or more computer-readable media, wherein the one or morecomputer-readable media contain instructions that, when executed by theprocessing system, cause the processing system to perform operationscomprising: obtaining an image comprising license plate information;dividing the image into a plurality of sub-blocks; computing a spatialactivity measure for each sub-block of the plurality of sub-blocks,wherein the spatial activity measure includes a two-dimensional discretecosine transform (DCT); generating a one-dimensional activity profilefor the image based on the spatial activity measure for each sub-block;determining an activity threshold based on a predetermined percentage;determining that a sub-block of the plurality of sub-blocks is an activesub-block by comparing the spatial activity measure for the sub-blockwith the activity threshold; generating, using one or more processors, asecond image of the license plate information, wherein the second imagecomprises the active sub-block; and obtaining the license plateinformation based on the second image.
 12. The system of claim 11,wherein, prior to obtaining the image, the image is generated byvertically cropping a third image comprising the license plateinformation.
 13. The system of claim 11, wherein, prior to obtaining theimage, the image is generated by removing tilt from a third imagecomprising the license plate information.
 14. The system of claim 11,the operations further comprising performing a frequency analysis oneach sub-block of the plurality of sub-blocks, wherein the spatialactivity measure for each sub-block is based on the frequency analysisof that sub-block.
 15. The system of claim 11, the operations furthercomprising determining that a second sub-block of the plurality ofsub-blocks is inactive, wherein: the spatial activity measure of thesecond sub-block is less than the activity threshold; and the secondsub-block is determined to be inactive based on the second sub-blockbeing between the active sub-block and a third active sub-block in theimage.
 16. The system of claim 11, the operations further comprisingdetermining that a second sub-block of the plurality of sub-blocks is aninactive sub-block by comparing the spatial activity measure for thesecond sub-block with the activity threshold, wherein the second imagedoes not comprise the inactive sub-block.
 17. The system of claim 16,the operations further comprising determining that a third sub-block ofthe plurality of sub-blocks is an inactive sub-block by determining thatthe third sub-block is between the inactive sub-block and an edge of theimage.
 18. The system of claim 11, the operations further comprisingdetermining that a second sub-block of the plurality of sub-blocks isactive, wherein: the spatial activity measure of the second sub-block isless than the activity threshold; and the second sub-block is determinedto be active based on the second sub-block being between the activesub-block and a third active sub-block in the image.
 19. The system ofclaim 11, the operations further comprising: determining a third imageof the license plate comprising only active sub-blocks; determining thatthe third image is overcropped with respect the license plateinformation based on comparing a ratio of the third image with anexpected license plate ratio; and wherein, the second image additionallycomprises one or more inactive sub-blocks.
 20. The system of claim 11,wherein the spatial activity measure is computed using the formula:$a_{ij} = {\sum\limits_{k \cdot {l{({{k + l} > 0})}}}{C_{kl}}^{2}}$wherein C_(kl) represents resultant coefficients of a two-dimensionalDCT performed on a sub-block B_(ij), and a_(ij) represents the spatialactivity measure for the sub-block B_(ij).